package com;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@ExcelTarget("user")
public class User implements Serializable {

    @Excel(name = "编号", orderNum = "1")
    private String id;

    @Excel(name = "姓名", orderNum = "2")
    private String name;

    @Excel(name = "年龄", orderNum = "4", suffix = " $")
    private Integer age;

    @Excel(name = "生日", orderNum = "3", width = 20.0, exportFormat = "yyyy年MM月dd日")
    private Date birthday;

    @Excel(name = "状态", orderNum = "4")
    private String status;

    @ExcelEntity(name = "身份信息")
    private Card card;

    @ExcelCollection(name="订单",orderNum = "5")
    private List<Order> orders;
}
